//
//  LFBBaseCustomLeftBarButtonItemViewController.m
//  loveFreshBeen
//
//  Created by Feng on 2017/7/12.
//  Copyright © 2017年 feng. All rights reserved.
//

#import "LFBBaseCustomLeftBarButtonItemViewController.h"

@interface LFBBaseCustomLeftBarButtonItemViewController ()

@end

@implementation LFBBaseCustomLeftBarButtonItemViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setUpLeftButtonItem];
}

/*!
 *  默认修改了左上角的item值
 */
- (void)setUpLeftButtonItem{
    
    UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
    [leftBtn setImage:[[UIImage imageNamed:@"v2_goback"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
    [leftBtn addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
    
}

/*!
 *  如果想任意跳转，就重写goBack方法
 */
- (void)goBack{
    
    [self.navigationController popViewControllerAnimated:YES];
}

@end
